﻿@model IEnumerable<blacksoft.Models.OrdenCompra>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_LayoutCompras.cshtml";
}

        
<div class="block big">
    <div class="titlebar">
        <h3>Ordenes de Compra</h3>
    </div>
    <div class="block_cont">
        <a href="/OrdenCompra/Create?accion=reset" class="navbutton"><span class="icon_plus">Nuevo</span></a>
        <hr />
        <table class="data-table">
            <thead>
                <tr>
                    <th>
                        ID
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.Fecha)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.Subtotal)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.IGV)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.Total)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.Estado)
                    </th>
                    <th>
                        PROVEEDOR
                    </th>
                    <th>ACCIONES</th>
                </tr>
            </thead>

            @foreach (var item in Model)
            {
                <tr>
                    <td>
                        @Html.DisplayFor(modelItem => item.IDOrdenCompra)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.Fecha)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.Subtotal)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.IGV)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.Total)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.Estado)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.Persona.RazonSocial)
                    </td>
                    <td>
                        <div style="height: 3px;"></div>
                        <div class="actionbar">
                            <a href=@string.Concat("/OrdenCompra/Details/", item.IDOrdenCompra) class="action view"><span>Detalles</span></a>
                            <a href=@string.Concat("/OrdenCompra/Delete/", item.IDOrdenCompra) class="action delete"><span>Eliminar</span></a>
                        </div>
                    </td>
                </tr>
            }

        </table>
    </div>
</div>
